﻿using ProtoBuf;

namespace ToyChat
{
    /// <summary>
    /// A serializable login challenge
    /// </summary>
    [ProtoContract(Name = "LoginChallenge")]
    public class LoginChallenge
    {
        /// <summary>
        /// Gets or Sets the username this challenge is for
        /// </summary>
        [ProtoMember(1)]
        public string Username { get; set; }

        /// <summary>
        /// Gets or Sets the password of the user in question
        /// </summary>
        [ProtoMember(2)]
        public string Password { get; set; }

        /// <summary>
        /// Specifies whether or not a password is actually required to log in
        /// </summary>
        [ProtoMember(3)]
        public bool PasswordRequired { get; set; }

        /// <summary>
        /// Gets or Sets the desired nickname of the user
        /// </summary>
        [ProtoMember(4)]
        public string Nickname { get; set; }
    }
}